package com.xgg.taiwuinfo.gongfa.abilities;

import android.content.Context;

//运功时的架势能力
public class Ability_YunGong_QiShi
{
    final double Tiqi;
    final double Jiashi;
    final int TiqiCost ;
    final int JiashiCost;
    final int NeigongFahui;

    public static final int Count = 5;

    public double getTiqi(){return Tiqi;}

    public double getJiashi(){return Jiashi;}

    public int getTiqiCost(){return TiqiCost;}

    public int getJiashiCost(){return JiashiCost;}

    public int getNeigongFahui(){return NeigongFahui;}

    public Ability_YunGong_QiShi(int [] action)
    {
        Tiqi  = (double)(action[0]) / 100.0;
        Jiashi  = (double)(action[1]) / 100.0;
        TiqiCost  = action[2];
        JiashiCost  = action[3];
        NeigongFahui  = action[4];
    }

    public String getDescString(Context ctx)
    {
        String rt = "";
        if (Tiqi !=  0) { String str = String.format("提气速度: +%.2f\r\n" , Tiqi); rt += str;}
        if (Jiashi !=  0) { String str = String.format("架势速度: +%.2f\r\n" , Jiashi); rt += str;}
        if (TiqiCost !=  0) { String str = String.format("提气消耗: -%d%%\r\n" , TiqiCost); rt += str;}
        if (JiashiCost !=  0) { String str = String.format("架势消耗: -%d%%\r\n" , JiashiCost); rt += str;}
        if (NeigongFahui !=  0) { String str = String.format("内功发挥: %d%%\r\n" , NeigongFahui); rt += str;}
        return rt;
    }

}
